package com.wangzefeng.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author wangzefeng
 * @since 2021-03-18
 */
public class UserMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "message_id", type = IdType.AUTO)
    private Integer messageId;

    /**
     * 发送者id
     */
    private Integer senderId;

    /**
     * 接收者id
     */
    private Integer receiverId;

    /**
     * 信息类型：分为文字，图片或其他文件
     */
    private String messageType;

    /**
     * 消息正文
     */
    private String messageContent;

    /**
     * 是否已读
     */
    private Integer isRead;

    /**
     * 文件名
     */
    private String messageFileName;

    /**
     * 文件id
     */
    private Integer messageFileId;

    /**
     * 消息发送时间
     */
    private Date messageTime;


    public Integer getMessageId() {
        return messageId;
    }

    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    public Integer getSenderId() {
        return senderId;
    }

    public void setSenderId(Integer senderId) {
        this.senderId = senderId;
    }

    public Integer getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(Integer receiverId) {
        this.receiverId = receiverId;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public String getMessageFileName() {
        return messageFileName;
    }

    public void setMessageFileName(String messageFileName) {
        this.messageFileName = messageFileName;
    }

    public Integer getMessageFileId() {
        return messageFileId;
    }

    public void setMessageFileId(Integer messageFileId) {
        this.messageFileId = messageFileId;
    }

    public Date getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(Date messageTime) {
        this.messageTime = messageTime;
    }

    @Override
    public String toString() {
        return "UserMessage{" +
        "messageId=" + messageId +
        ", senderId=" + senderId +
        ", receiverId=" + receiverId +
        ", messageType=" + messageType +
        ", messageContent=" + messageContent +
        ", isRead=" + isRead +
        ", messageFileName=" + messageFileName +
        ", messageFileId=" + messageFileId +
        ", messageTime=" + messageTime +
        "}";
    }
}
